/*
 * @Author: Shane
 * @Date: 2022-07-01 15:55:53
 * @LastEditTime: 2022-09-07 11:01:25
 * @LastEditors: Shane
 * @Description: 
 * @FilePath: /app-product/Users/shane/Desktop/com/app-framework/common_widgets/lib/app_bar/app_bar_base.dart
 */

import 'package:flutter/material.dart';

class KKAppBarBase extends AppBar {
  KKAppBarBase(
    BuildContext context, {
    Key? key,
    Widget? title,
    Color? backgroundColor,
    double? elevation,
    Brightness? brightness,
    Widget? leading,
    double leadingWidth = 56,
    double? titleSpacing,
    Function()? onTapCallback,
    List<Widget>? actions,
    PreferredSizeWidget? bottom,
    bool centerTitle = true,
  }) : super(
          key: key,
          title: title,
          centerTitle: centerTitle,
          backgroundColor: backgroundColor ?? Colors.white,
          elevation: elevation ?? 0,
          leadingWidth: leadingWidth,
          titleSpacing: titleSpacing,
          leading: leading ??
              IconButton(
                  onPressed: onTapCallback ??
                      () {
                        Navigator.of(context).pop();
                      },
                  icon: const Icon(
                    Icons.arrow_back_ios,
                    color: Color(0xFF909399),
                  )),
          actions: actions,
          bottom: bottom,
        );
}
